﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Numbers;
using System.ComponentModel;

namespace System8ToyMC
{
	public partial class FlavorSampleUC : UserControl
	{
		public FlavorSampleUC()
		{
			// Required to initialize variables
            InitializeComponent();
            LayoutRoot.DataContext = this;
        }

        [Category("Numbers")]
        [Description("Title of sample to show on the UI surface")]
        public string SampleName
        {
            get { return (string)GetValue(SampleNameProperty); }
            set { SetValue(SampleNameProperty, value); }
        }

        // Using a DependencyProperty as the backing store for SampleName.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty SampleNameProperty =
            DependencyProperty.Register("SampleName", typeof(string), typeof(FlavorSampleUC), new PropertyMetadata(""));

        /// <summary>
        /// Get/Set the flavor info guy!
        /// </summary>
        [Category("Numbers")]
        [Description("Flavor info we should be showing to the user")]
        public FlavorSample FlavorInfo
        {
            get { return (FlavorSample)GetValue(FlavorInfoProperty); }
            set { SetValue(FlavorInfoProperty, value); }
        }

        // Using a DependencyProperty as the backing store for FlavorInfo.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty FlavorInfoProperty =
            DependencyProperty.Register("FlavorInfo", typeof(FlavorSample), typeof(FlavorSampleUC), new PropertyMetadata(null));

        /// <summary>
        /// Hold onto the path internally for later reference!
        /// </summary>
        private string _path = "";
        /// <summary>
        /// Stash the path.
        /// </summary>
        public string Path { get {return _path;}
            set
            {
                _path = value;
                NVnb.Path = _path + "/BottomValue";
                NVnc.Path = _path + "/CharmValue";
                NVnl.Path = _path + "/LightValue";
                NVncl.Path = _path + "/LightCharmValue";
                NVntot.Path = _path + "/TotalValue";
            }
        }
    }
}